package store.lunangangster.engine.impl.el;

import javax.el.ELContext;
import javax.el.ValueExpression;

public class DefaultExpression implements Expression {

  protected ELContext context;
  protected ValueExpression valueExpression;

  public DefaultExpression(ELContext context, ValueExpression valueExpression) {
    this.context = context;
    this.valueExpression = valueExpression;
  }

  @Override
  public Class<?> getExpectedType() {
    return valueExpression.getExpectedType();
  }

  @Override
  public Object getValue() {
    return valueExpression.getValue(context);
  }
}
